package com.kehutong.charge.util.enums;

import org.coraframework.util.HashID;

import java.util.EnumSet;
import java.util.HashMap;

/**
 * @program: kht
 * @description: 缴费订单状态枚举
 * @author: joneron
 * @create: 2021/7/5
 **/
public enum ChargeOrderStatusEnum implements HashID {

    ORDER_WAIT_PAY("1","待付款"),
    ORDER_RUN_PAY("2","付款中"),
    ORDER_PAY_SUCCESS("3","已完成"),
    ORDER_PAY_FAIL("4","付款失败"),
    ORDER_CLOSE("5","已关闭"),
    ORDER_REFUND("6","已退款"),
    ORDER_REFUND_WAY("7","退款中"),
    ORDER_REFUND_NOT("8","未支付"),
    ;

    private final String id;
    private final String desc;

    private ChargeOrderStatusEnum(String id, String desc) {
        this.id = id;
        this.desc = desc;
    }

    /**
     * 获取map集合
     * @return
     */
    public static HashMap<String,String> getMap() {
        HashMap<String, String> map = new HashMap<>();
        for (ChargeOrderStatusEnum enums : EnumSet.allOf(ChargeOrderStatusEnum.class)) {
            map.put(enums.id, enums.desc);
        }
        return map;
    }

    @Override
    public String getId() {
        return id;
    }


    @Override
    public String getDesc() {
        return desc;
    }
}
